package Utils;

import java.util.Calendar;
import java.util.Date;

public class Utils {
	
	public static boolean isOlderThanMonths(Date fecha, int meses){
		Calendar calendar = Calendar.getInstance();
		calendar.add(Calendar.MONTH, meses * -1);
		return fecha.before(calendar.getTime());
	}

	public static boolean isOlderThanYears(Date fecha, int anios) {
		Calendar calendar = Calendar.getInstance();
		calendar.add(Calendar.MONTH, anios * -1);
		return fecha.before(calendar.getTime());
	}
}
